<template>
  <basePage :page-params="pageParams">
    <view style="padding: 0 20rpx;">
      <MenuCell
        :cell-data.sync="menuList"
        :cell-column="cellColumn"
      />
    </view>
  </basePage>
</template>

<script>
import basePage from '@/components/base-page'
import MenuCell from '@/components/menu-cell'
import { getAfterSaleDetail } from '@/api/yc_userInfo';
export default {
  name: 'Index',
  components: {
    basePage,
    MenuCell
  },
  data() {
    return {
      pageParams: {
        state: null,
        emptyTitle: '',
        errorTitle: '',
        showButton: false
      },
      cellColumn: [
        {
          label: '服务单状态',
          fields: ['afterStatusName'],
        },
        {
          label: '服务单号',
          fields: ['serviceNo'],
        },
        {
          label: '申请时间',
          fields: ['applyTime'],
        },
        {
          label: '申请理由',
          fields: ['reason'],
        },
        {
          label: '申请理由描述',
          fields: ['reasonDesc'],
        }
      ],
      menuList: {},
    }
  },
  onLoad(option) {
    this.initFn(option.orderSn)
  },
  mounted() {
  },
  methods: {
    initFn(orderSn) {
      const params = {
        orderSn: orderSn
      }
      getAfterSaleDetail(params).then((res) => {
        if (res.code == 0) {
          this.menuList = res.data
        } else {
          this.$u.toast(res.msg)
        }
      })
    }

  }
}
</script>

<style lang="scss" scoped>
.btn-box{
  position: absolute;
  left: 64rpx;
  bottom: 68rpx;
  display: flex;
  .confirm-btn{
    width: 312rpx;
    height: 64rpx;
    line-height: 64rpx;
    color: #fff;
    background: linear-gradient(128.8deg, #ff795f 0%, #ee3d1a 100%);
    font-size: 28rpx;
    margin-right: 4rpx;
  }
  .btn{
    border: 0 !important;
    border-radius: 8rpx;
    width: 312rpx;
    height: 64rpx;
    line-height: 64rpx;
  }
}

</style>
